-- GENERATED SPELL FOR [Winterskorn Spearman] --


function spell0_23653(pUnit, Event) --@Freezing Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(43414,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_23653', 1, 1)
end

function spell1_23653(pUnit, Event) --@Throw Spear,n/a--
pUnit:FullCastSpellOnTarget(55217,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23653', 579, 1)
end

function spell2_23653(pUnit, Event) --@Wing Clip,n/a--
pUnit:FullCastSpellOnTarget(32908,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23653', 10296, 1)
end

function Sorts_23653(pUnit, Event)
local choix_sorts_23653 = math.random(0, 2)
if choix_sorts_23653 == 0 then
pUnit:RegisterEvent('spell0_23653', 1, 1)
end
if choix_sorts_23653 == 1 then
pUnit:RegisterEvent('spell1_23653', 1, 1)
end
if choix_sorts_23653 == 2 then
pUnit:RegisterEvent('spell2_23653', 1, 1)
end
end

function mob23653_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23653', math.random(1500, 3000), 1)
end

function mob23653_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23653_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23653_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23653, 1, 'mob23653_Action')
RegisterUnitEvent(23653, 2, 'mob23653_Leave')
RegisterUnitEvent(23653, 3, 'mob23653_Kill')
RegisterUnitEvent(23653, 4, 'mob23653_Die')
